using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;
using CommonTools;

namespace shop.Model
{

	[Table(Name = "c_logs")]
	public partial class CLogs 
	{

		[Column(Name = "id", IsPrimary = true, IsIdentity = true)]
		public int Id { get; set; }

		[Column(Name = "riqi", ServerTime = DateTimeKind.Local)]
		public DateTime? Riqi { get; set; }


		[Column(StringLength = 50)]
		public string DocId { get; set; }

		[Column(StringLength = 50)]
		public string DocName { get; set; }


		[Column(StringLength = 20)]
		public string DocAction { get; set; }


		[Column(StringLength = 1000)]
		public string Note { get; set; }


		[Column(Name = "zdr", StringLength = 50)]
		public string Zdr { get; set; }



		[Column(StringLength = 100)]
		public string Computer { get; set; }



		public CLogs()
		{
			
		}


		public CLogs(IDoc doc, IUser user, string docAction = null, string note = null)
		{
			DocId = doc.DocId.ToString();
			DocName = doc.DocFlag;
			Zdr = user.Name;
			Computer = user.ComputerInfo;
			DocAction = docAction;
			Note = note;
		}

	}

}
